﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NLog;

namespace WebMvc.Areas.Sys.Controllers
{
    [Area("Sys")]
    [Authorize]
    public class HomeController:Controller
    {
        //定义一记录日志的容器
        protected static Logger Logger = LogManager.GetCurrentClassLogger();
                
        public IActionResult Index()
        {
            return View();
        }

        public IActionResult About()
        {
            ViewData["Message"] = "Your application description page.";

            return View();
        }

        public IActionResult Error()
        {
            return View();
        }
               

        //权限不足时跳转
        public IActionResult AccessDenied()
        {
            return View();
        }
                
    }
}
